<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:form="http://java.sun.com/jsf/composite/components/form"
	template="/templates/include/securedmain.xhtml">

	<ui:define name="content">

		<h:form id="form">

			<h:inputHidden value="true">
				<f:validator validatorId="createObjectValidator" />
				<f:attribute name="ident" value="#{ident}" />
			</h:inputHidden>

			<p:growl id="growl" showDetail="true" sticky="false" />
			<p:panelGrid id="grid" columns="2" rowClasses="center-td">




				<f:facet name="header">
					<h:outputText value="#{msg['view.objectcreate.form.head']}" />
				</f:facet>
				<h:outputText value="#{msg['properties.object.name']}:" />
				<p:inputText value="#{editObjectBean.selectedObject.name}" id="name"
					required="true" />

				<h:outputText value="#{msg['properties.object.identifier']}:" />
				<p:inputText binding="#{ident}"
					value="#{editObjectBean.selectedObject.identifier}" id="ident"
					required="true" />


				<h:outputText value="#{msg['properties.object.description']}:" />
				<p:inputTextarea autoResize="false"
					value="#{editObjectBean.selectedObject.description}" id="desc"
					required="true" />


				<h:outputText value="#{msg['properties.objectclass.name']}:" />
				<p:selectOneMenu value="#{editObjectBean.selectedObjectClass}"
					effect="fade" converter="objectClassConverter">
					<f:selectItems value="#{editObjectBean.objectClasses}"
						var="objClass" itemLabel="#{objClass.name}"
						itemValue="#{objClass}" />
					<p:ajax event="change" update="@this" />
				</p:selectOneMenu>

				<f:facet name="footer">
					<p:commandButton id="commitButton"
						action="#{editObjectBean.create}"
						value="#{msg['view.actions.button.commit']}" update="@form"
						ajax="false" />
				</f:facet>
			</p:panelGrid>
		</h:form>
	</ui:define>
</ui:composition>
